package com.smallA.association.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;

/**
 * 角色权限表实体类
 *
 * @author 君未洋
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Access implements GrantedAuthority {
    private int id;
    private String name;
    private String context;

    @JsonIgnore
    public String getContext() {
        return this.context;
    }

    @JsonIgnore
    public int getId() {
        return this.id;
    }

    @JsonIgnore
    @Override
    public String getAuthority() {
        return this.name;
    }
}
